<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <title>我的收藏</title>
    <link rel="stylesheet" href="css/drawer.css">
    <!-- menu -->
    <link rel="stylesheet" href="css/aui.css">
    <link rel="stylesheet" href="css/aui-flex.css">
    <link rel="stylesheet" href="css/weui.css">
    <link rel="stylesheet" href="css/style.css">
    <link rel="stylesheet" href="css/qr_base.css">
    <link rel="stylesheet" href="css/common.css">
    <script src="js/jquery.min.js"></script>
    <script type="text/javascript" src="js/iscroll.js"></script>
    <!-- menu -->
    <script type="text/javascript" src="js/jquery.drawer.min.js"></script>
    <!-- menu -->
    <script type="text/javascript" src="js/js.js"></script>
    <!-- 网站js -->
</head>
<style type="text/css">
    body {
        background-color: #fff;
    }


    /* 左边分类样式 */

    .caibox {
        overflow-x: hidden;
        overflow-y: auto;
    }

    .fangxinginfoview h4 {
        margin-bottom: 0;
    }

    .padbottom {
        padding-bottom: 47px;
        background-color: #fff;
    }


    .midcailist .aui-list-view-cell{
        padding: 8px!important;
    }
    .midcailist .numbox{
        padding: 0!important;
    }

    .cailist {
        padding: 0;
    }
    .shoucangOut{
        width: 100% !important;
    }
</style>

<body ontouchstart="" class="drawer drawer-right">
<div class="viewport">
    <header class="aui-bar aui-bar-nav">
        <a class="aui-pull-left" href="javascript:history.back();">
            <span class="aui-iconfont aui-icon-left"></span>
        </a>
        <div class="aui-title">我的收藏</div>
        <a class="aui-pull-right drawer-toggle">
            <span class="aui-iconfont aui-icon-sort"></span>
        </a>
    </header>
    <!-- 侧边导航开始 -->
    <div class="drawer-main drawer-default">
        <nav class="drawer-nav" role="navigation">
            <!-- 未登录 -->
            <div class="touxiang">
                <a href="login.html" class="touxiangimg"><img src="images/touxiang.png" width="100%"></a>
                <span><a href="login.html">登录</a><a href="register.html">注册</a></span>
            </div>
            <!-- 登录后 -->
            <div class="touxiang" style="display:none;">
                <a href="userCenter.html" class="touxiangimg"><img src="images/touxiang.png" width="100%"></a>
                <span>jack</span>
                <span>黄金会员</span>
            </div>
            <ul class="drawer-nav-list">
                <li><a href="userIndex.html"><i class="menuicon1"></i>会员中心</a></li>
                <li><a href="dfZhitongcheInfo.html"><i class="menuicon2"></i>订房直通车</a></li>
                <li><a href="cyYongcanFangshi.html"><i class="menuicon3"></i>餐饮定制</a></li>
                <li><a href="kfFuwu.html"><i class="menuicon4"></i>客房服务</a></li>
                <li><a href="lbFuwu.html"><i class="menuicon5"></i>礼宾服务</a></li>
                <li><a href="kfyanzhu.html"><i class="menuicon6"></i>客房延住</a></li>
                <li><a href="ksTuifang.html"><i class="menuicon7"></i>快速退房</a></li>
                <li><a href="dnDaohang.html"><i class="menuicon8"></i>店内导航</a></li>
                <li><a href="jdList.html"><i class="menuicon9"></i>周边信息</a></li>
                <li><a href="sdJiabinhui.html"><i class="menuicon10"></i>首都嘉宾会</a></li>
                <li><a href="userJifenShangcheng.html"><i class="menuicon11"></i>积分商城</a></li>
            </ul>
        </nav>
    </div>
    <!-- 侧边导航结束 -->
    <!-- 选菜开始 -->
    <div class="aui-content caibox" style="margin-bottom:0;width:100%;overflow:hidden;">
        <div class="aui-flex-col">
            <div class="aui-flex-item-9 caibox shoucangOut">
                <ul class="aui-list-view midcailist">
                    <li class="aui-list-view-cell aui-img aui-counter-list">
                        <img class="aui-img-object aui-pull-left" src="images/cai.jpg">
                        <div class="aui-img-body">
                            冰激凌
                            <div class="aui-counter-box">
                                <div class="aui-pull-left aui-text-danger">¥ 80</div>
                            </div>
                        </div>
                    </li>
                    <li class="aui-list-view-cell aui-img aui-counter-list">
                        <img class="aui-img-object aui-pull-left" src="images/cai.jpg">
                        <div class="aui-img-body">
                            冰激凌
                            <div class="aui-counter-box">
                                <div class="aui-pull-left aui-text-danger">¥ 80</div>
                            </div>
                        </div>
                    </li>
                    <li class="aui-list-view-cell aui-img aui-counter-list">
                        <img class="aui-img-object aui-pull-left" src="images/cai.jpg">
                        <div class="aui-img-body">
                            冰激凌
                            <div class="aui-counter-box">
                                <div class="aui-pull-left aui-text-danger">¥ 80</div>
                            </div>
                        </div>
                    </li>
                    <li class="aui-list-view-cell aui-img aui-counter-list">
                        <img class="aui-img-object aui-pull-left" src="images/cai.jpg">
                        <div class="aui-img-body">
                            冰激凌
                            <div class="aui-counter-box">
                                <div class="aui-pull-left aui-text-danger">¥ 80</div>
                            </div>
                        </div>
                    </li>
                    <li class="aui-list-view-cell aui-img aui-counter-list">
                        <img class="aui-img-object aui-pull-left" src="images/cai.jpg">
                        <div class="aui-img-body">
                            冰激凌
                            <div class="aui-counter-box">
                                <div class="aui-pull-left aui-text-danger">¥ 80</div>
                            </div>
                        </div>
                    </li>
                    <li class="aui-list-view-cell aui-img aui-counter-list">
                        <img class="aui-img-object aui-pull-left" src="images/cai.jpg">
                        <div class="aui-img-body">
                            冰激凌
                            <div class="aui-counter-box">
                                <div class="aui-pull-left aui-text-danger">¥ 80</div>
                            </div>
                        </div>
                    </li>
                </ul>
            </div>
        </div>
    </div>
    <!-- 选菜结束 -->
    <!-- 操作容器 -->
    <!-- <div class="padbottom"></div> -->
    <!-- 购物车 开始 -->
    <div id="actionSheet_wrap">
        <div class="weui_mask_transition " id="mask" style="display: none;"></div>
        <div class="weui_actionsheet " id="weui_actionsheet">
            <div class="fangxinginfoview">
                <h4><img src="images/fang_ico_08.jpg" alt="" />购物车<span id="actionsheet_cancel" class="c_8 fr">关闭</span></h4>
                <div class="cailist">
                    <li class="aui-border-b">
                        <span class="name">冰激凌</span>
                        <span class="num">￥28</span>
                            <span class="price">
                                <div class="aui-counter aui-pull-right">
                                    <div class="aui-counter-minus" onclick="cartsub(70);"></div> <!-- 参数传id -->
                                    <span class="aui-counter-input num70">1</span><!-- 参数传id -->
                                    <div class="aui-counter-plus" onclick="add(70);"></div><!-- 参数传id -->
                                </div>
                            </span>
                    </li>


                </div>
            </div>
            <div class="padbottom"></div>
        </div>
    </div>
    <!-- 购物车 结束 -->
</div>
<script type="text/javascript">
    /*添加收藏*/
    $(".cyshoucang").click(function() {
        if ($(this).find("i").hasClass("aui-icon-favor")) {
            $(this).find("i").removeClass("aui-icon-favor").addClass("aui-icon-favorfill");
            $(this).find("em").html("取消");
        } else {
            $(this).find("i").removeClass("aui-icon-favorfill").addClass("aui-icon-favor");
            $(this).find("em").html("收藏");
        }
    })

    //数量递减
    function sub(id){
        $(".num"+id).html(parseInt($(".num"+id).html())-1);
        if($(".num"+id).html()<=0){
            $(".num"+id).html(0);
        }
    }
    //购物车数量递减到0时等于删除
    function cartsub(id){
        $(".num"+id).html(parseInt($(".num"+id).html())-1);
        if($(".num"+id).html() == 0){
            $(".num"+id).parent().parent().parent().remove();
        }
    }
    //数量递增
    function add(id){
        $(".num"+id).html(parseInt($(".num"+id).html())+1);
    }

    $(function() {
        /*选菜类型*/
        $(".caileixing li").each(function(e) {
            $(this).click(function() {
                $(this).addClass("hover");
                $(this).siblings().removeClass("hover");
            })
        })

        /*选菜容器高度固定*/
        var h_bottom = $(window).height() - $("header").height() - $(".bottomcaozuo").height();
        $(".caibox").css({
            height: h_bottom + "px"
        });


        /*弹出购物车*/
        $('#showActionSheet').click(function() {
            var mask = $('#mask');
            var weuiActionsheet = $('#weui_actionsheet');
            weuiActionsheet.addClass('weui_actionsheet_toggle');
            mask.show().addClass('weui_fade_toggle').click(function() {
                hideActionSheet(weuiActionsheet, mask);
            });
            $('#actionsheet_cancel').click(function() {
                hideActionSheet(weuiActionsheet, mask);
            });
            weuiActionsheet.unbind('transitionend').unbind('webkitTransitionEnd');

            function hideActionSheet(weuiActionsheet, mask) {
                weuiActionsheet.removeClass('weui_actionsheet_toggle');
                mask.removeClass('weui_fade_toggle');
                weuiActionsheet.on('transitionend', function() {
                    mask.hide();
                }).on('webkitTransitionEnd',
                        function() {
                            mask.hide();
                        })
            }
        });
        $('.weui_actionsheet_menu .weui_actionsheet_cell').click(function() {
            alert($(this).text());
            $('#showActionSheet1').val($(this).text());
            $('#actionsheet_cancel').click();
        })

    })
</script>
</body>

</html>
